"""Small launcher for the ZMQ client node.

This file keeps the original entrypoint name so existing rosrun/launch files
continue to work but pushes implementation into `client_node.py`.
"""
from __future__ import annotations

import rospy
import sys
import os
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if REPO_ROOT not in sys.path:
    sys.path.insert(0, REPO_ROOT)
try:
    # prefer package import
    from zmqclient.client_node import ZMQClientNode
except Exception:
    # fallback: local import when running as a script inside package folder
    from client_node import ZMQClientNode


def main():
    rospy.init_node('zmq_client_node', anonymous=True)
    node = ZMQClientNode()
    rospy.spin()


if __name__ == '__main__':
    main()
